package com.ie.api.center.manager.feign;

import com.ie.api.center.manager.hystrix.TenantClientHystrix;
import com.xj.common.bean.R;
import com.xj.common.bean.constant.Common;
import com.xj.common.model.Tenant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


//定义一个feign接口，通过@FeignClient("服务名")，来指定调用哪个服务
@FeignClient(value = Common.Service.IE_MANAGER_SERVICE_NAME,fallback= TenantClientHystrix.class)
public interface TenantClient {
	

	@RequestMapping(value = Common.Service.IE_MANAGER_TENANT+Common.Service.IE_MANAGER_TENANT_FIND, method = RequestMethod.POST)
	public R<Tenant> selectByName(@RequestBody String tenantName);

	@RequestMapping(value = Common.Service.IE_MANAGER_TENANT+Common.Service.IE_MANAGER_TENANT_LIST, method = RequestMethod.POST)
	public R<List<Tenant>> list();
}






